<?xml version="1.0" encoding="iso-8859-1" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	
	<xsl:output method="html" encoding="iso-8859-1" standalone="yes" />
	
	<xsl:template match="/">
		<html>
			<head>
                                <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
				<title>WAI Beispiel | XML => HTML (via XSLT)</title>
			</head>
			<body>
				<xsl:apply-templates select="verzeichnis" />
			</body>
		</html>
	</xsl:template>
	
	<xsl:template match="verzeichnis">
		<p>
			<xsl:apply-templates select="titel | eintrag" />
		</p>
	</xsl:template>
	
	<xsl:template match="eintrag">
		<ul>
			<xsl:apply-templates select="stichwort | eintragstext" />
		</ul>
	</xsl:template>
	
	<xsl:template match="titel">
		<h2>
			<xsl:value-of select="." disable-output-escaping="yes" />
		</h2>
	</xsl:template>
	
	<xsl:template match="@*">
		<li>
			<xsl:value-of select="local-name()" />
			<xsl:text> = </xsl:text>
			<xsl:value-of select="." />
		</li>		
	</xsl:template>
	
	<xsl:template match="stichwort | eintragstext">
		<li>
			<xsl:value-of select="text()" disable-output-escaping="yes" />
			<ol>
				<xsl:apply-templates select="@*" />
			</ol>
		</li>
	</xsl:template>
	
</xsl:stylesheet>